﻿/*
 * @Author: gaoqihang
 * @Date:   2019-03-04
 * @lastModify 2019-03-04
 * +----------------------------------------------------------------------
 * | 通用方法
 * +----------------------------------------------------------------------
 */
layui.use(['jquery'], function () {
    var $ = layui.jquery;
    //获取url参数
    window.getUrlParam = function (name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        //使用decodeURI解决中文参数乱码问题
        if (r != null) return decodeURI(r[2]); return null;
    }
});